package org.wuhong.service.impl;

import com.wuhong.entity.Catalogue;
import com.wuhong.result.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.wuhong.service.CatalogueService;
import org.wuhong.mapper.CatalogueMapper;

/**
 * @ClassName CatalogueImpl
 * @Description TODO
 * @Author director吴
 * @Date 2023/1/2 17:13
 * @Version 1.0
 **/
@Service
public class CatalogueServiceImpl implements CatalogueService {

    @Autowired
    CatalogueMapper catalogueMapper;

    @Override
    public ResultData<Catalogue> getCatalogueByUserId(String userId) {
        Catalogue catalogue = catalogueMapper.selectByPrimaryKey(userId);
        ResultData resultData = new ResultData();
        resultData.setData(catalogue);
        resultData.setSuccess(true);
        return resultData;
    }
}
